home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / tptc16.zip / README < prev    next >
Text File  |  1993-01-04  |  5KB  |  131 lines

  1.  
  2. This is a PRE-RELEASE of TPC 1.5.  The documentation has not been updated yet,
  3. and there may well be serious bugs.   This version has been released for 
  4. testing only and should not be redistributed.
  5.  
  6.                         Samuel H. Smith
  7.                         The Tool Shop
  8.                         (602) 279-2673
  9.  
  10.  
  11. Partial documentation for prerelease version    as of 8pm, 13-aug-87
  12. --------------------------------------------
  13.  
  14. todo:
  15.    -- in var params, passing address of pointer
  16.    -- two dimensional arrays, typed constants, see test.pas
  17.    -- array[a,b...] and array[a] of array... not translated
  18.    -- process subscripted (full lvalue) for fd's in read/write
  19.    -- translate 'str' and 'val'
  20.    -- string returning procedures translated to char * return
  21.    -- string (pointer to array) var parameters translated to char *
  22.    -- pointer deref does not determine lvalue type (i.e. xxx->m should
  23.       detect string types)
  24.    -- writeln strings:  'literal',^M^J,'another'
  25.    -- nested variable sharing not proper
  26.         procedure ordering
  27.         outer local decl's not prefixed
  28.    -- variant records not translated
  29.    -- untyped parameter variables
  30.    -- absolute variables
  31.  
  32. manual translations:
  33.    -- nested procedure ordering
  34.    -- atoi macro clash ?
  35.  
  36. changes
  37.    -- turbo-c procedure declaration syntax
  38.    -- arrays subscripted by enumeration types
  39.    -- fails to handle null else clause in case statement
  40.    -- include intermediate cases in swith() .. case x..y
  41.    -- pointer/var parameter translation *id.mem should be id->mem
  42.    -- pointer/var parameter translation *id[n] should be id[n]
  43.    -- concat(...)+char and string+char not detected as string/character
  44.         concat operation.
  45.    -- detect concat(concat... and replace with a sprintf variant
  46.  
  47. -- changed sprintf calls to sbld calls to preserve sources during build
  48. -- pos(c,str) and pos(str,str) are now separately translated
  49.  
  50. -- added 'base' to symbol table; use to add base-subscript offset
  51.    in all subscript references.
  52. -- moved typename translations to tpcmac.h header
  53. -- fixed bug in non-translation of tshell directives
  54. -- forward pointer declarations
  55. -- translate inline into asm statements
  56. -- complete forward translation
  57.  
  58. ---------------
  59. 13-oct-87
  60. -- improved string and array parameter translations
  61. -- string returns are now translated into char *
  62.  
  63. 15-oct-87
  64. -- corrected error in typed constant translation where nested
  65.    records are initialized.
  66. -- variant record declarations are translated into unions
  67.    but no variant expression translations are done.
  68. -- changed nested procedure error messages to include procedure name.
  69.  
  70.  
  71. (*
  72.  *
  73.  * TPC - Turbo Pascal to C translator
  74.  *
  75.  * S.H.Smith, 9/9/85  (rev. 13/8/87)
  76.  *
  77.  * Copyright 1986, 1987 by Samuel H. Smith;  All rights reserved.
  78.  *
  79.  *
  80.  * Revision history
  81.  * ----------------
  82.  *
  83.  *   09/09/85  v0.0  (paspp)
  84.  *      Initial coding by Samuel H. Smith.  Never released.
  85.  *
  86.  *   12/19/86  v1.0
  87.  *      First distributed as TPC10 under shareware concept.
  88.  *
  89.  *   04/15/87  v1.1
  90.  *      Corrected handling of unary minus.
  91.  *      Improved error messages; added error messages to object file.
  92.  *      Added handler for integer subrange types.
  93.  *      Added handling for goto statement and numeric labels.
  94.  *      The macro header, tpcmac.h, now contains more declarations.
  95.  *      Distributed as TPC11.
  96.  *
  97.  *   04/22/87  v1.2
  98.  *      Corrected an error that led to a crash on lines with more than 40
  99.  *      leading spaces.  Distributed as TPC12.
  100.  *
  101.  *   05/20/87  v1.3
  102.  *      Added support for pascal/MT+:  external procedures and variables,
  103.  *      special write/read indirect syntax, & and ! operators,
  104.  *      default string size for string declarations.
  105.  *      Distributed as TPC13.
  106.  *
  107.  *   05/26/87  v1.4
  108.  *      Additional support for pascal/MT+.   The translator "shifts" into a
  109.  *      MT+ specific mode when it recognizes the 'MODULE' statement.
  110.  *      The '|' operator is recognized for bitwise OR.
  111.  *      The '\', '?' and '~' operators are all translated into a unary
  112.  *      not (is this right, Noam?).
  113.  *      Read(ln) and Write(ln) now support the special case of "[]" for the
  114.  *      I/O routine.
  115.  *      Long integer literals are translated from '#nnn' to 'nnnL'
  116.  *
  117.  *   06/01/87  v1.5
  118.  *      Added new 2nd-line parser.
  119.  *      Added -lower option to map identifiers to lower case.
  120.  *      Added -mt option to force pascal/mt+ mode.
  121.  *      Added partial var-parameter translation.
  122.  *      Mem, MemW, Port and PortW are all translated into Turbo C.
  123.  *      Turbo-c procedure declaration syntax is now used.
  124.  *      Arrays may now be subscripted by enumeration types.
  125.  *      Null else clause now handled properly in IF and CASE statements.
  126.  *      For .. downto is now translated correctly.
  127.  *      The VAL..VAL form is now translated in case statements.
  128.  *
  129.  *)
  130.  
  131.